package summer_vacation.yangyiqing.m201508;

/**
 * Created by Administrator on 2015/8/28 0028.
 */
public class Java_40 {
    public static void main(String[] args) {
        int a = 1, b = 2, c = 3, s = 0;
        while (c <= 101) {
            s = s + (a * b * c);
            a = c;
            b = c + 1;
            c = c + 2;
        }
        System.out.println("1*2*3+3*4*5+...+99*100*101的和为" + s);
    }
}